package com.arpa.wms.service;

import com.arpa.ntocc.common.domain.vo.ShipmentVO;
import com.arpa.wms.domain.dto.WarehouseShipmentDTO;
import com.arpa.wms.domain.entity.WarehouseShipment;
import com.arpa.wms.domain.vo.WarehouseShipmentVO;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 仓库货主绑定关系 服务类
 * </p>
 *
 * @author LEO
 * @since 2020-08-03
 */
public interface IWarehouseShipmentService extends IService<WarehouseShipment> {


    /**
     * 查询列表
     * @param warehouseDTO
     * @return
     */
    List<WarehouseShipmentVO> queryList(WarehouseShipmentDTO warehouseDTO);

    /**
     * 查询合计,包含总数
     * @param warehouseDTO
     * @return
     */
    WarehouseShipmentVO queryListSum(WarehouseShipmentDTO warehouseDTO);

    /**
     * 删除仓库
     * @param code
     */
    void deleteByCode(String code);


    /**
     * 保存货主确认
     * @param codes 货主codes
     * @param warehouseCode 仓库code
     */
    void saveChoose(List<String> codes, List<Integer> useOms, String warehouseCode);

    /**
     * 查询仓库可选择的货主信息
     * @param warehouseShipmentDTO
     * @return
     */
    ShipmentVO queryShipmentListSum(WarehouseShipmentDTO warehouseShipmentDTO);

    /**
     * 查询仓库可选货主的数量
     * @param warehouseShipmentDTO
     * @return
     */
    List<ShipmentVO> queryShipmentList(WarehouseShipmentDTO warehouseShipmentDTO);


    /**
     * 判断货主仓库是否绑定
     * @param warehouseCode 仓库标识
     * @param shipmentCode 货主标识
     * @return true绑定，false未绑定
     */
    boolean isBind(String warehouseCode,String shipmentCode);


    /**
     * 获取所有仓库货主绑定信息
     * @return
     */
    List<WarehouseShipmentVO> getAll(String groupCode);

}
